class AttachAttachmentController < ApplicationController

def index
    @attachment =Attachment.find(:all)
  end

  def new
    @attachment =Attachment.new
  end

  def show
    @attachment =Attachment.find params[:id]
  end

  def create
    @attachment =Attachment.create! params[:attachment]
    redirect_to :action => 'show', :id => @attachment
    rescue ActiveRecord::RecordInvalid
    render :action => 'new'
  end
end






